package com.hyt.it.ogt.kq.service.gov.service;

import java.io.IOException;
import java.util.List;

import org.springframework.web.multipart.MultipartFile;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hyt.it.ogt.kq.service.gov.model.entity.ExamAgreement;
import com.hyt.it.ogt.kq.service.gov.model.param.AddExamAgreementParam;
import com.hyt.it.ogt.kq.service.gov.model.vo.ExamAgreementVO;
import com.hyt.it.ogt.kq.service.gov.model.vo.agreement.AgreementVO;

/**
 * <p>
 * 考试协议表 服务类
 * </p>
 *
 * @author huangyh
 * @since 2021-03-08
 */
public interface IExamAgreementService extends IService<ExamAgreement> {

    /**
     * 导入考试协议包
     *
     * @param param
     * @throws IOException
     */
    void add(AddExamAgreementParam param) throws IOException;

    /**
     * 删除考试协议
     *
     * @param ids 考试协议ids
     */
    void delete(String ids);

    /**
     * 根据考试任务id删除考试协议
     *
     * @param taskId 考试任务id
     * @return 是否成功
     */
    void deleteByTaskId(String taskId);

    /**
     * 获取考试协议
     *
     * @param taskId
     * @return
     */
    List<AgreementVO> getAgreementList(String taskId);

    /**
     * 上传考试协议
     * @param file
     * @param taskId
     * @return
     * @throws IOException
     */
    String uploadAgreementFile(MultipartFile file, String taskId) throws IOException;

    /**
     * 编辑考试协议
     * @param param
     * @throws IOException
     */
    void updateAgreement(AddExamAgreementParam param) throws IOException;

    /**
     * 查询全部考试协议
     * @param taskId
     * @return list
     */
    List<ExamAgreement> getExamAgreementList(String taskId);

    /**
     * 保存考生须知和欢迎语
     * @param examAgreementVO
     * @return
     */
    void saveExamNoticeAndWelcomeWords(ExamAgreementVO examAgreementVO);

    /**
     * 查询考生须知和欢迎语列表
     * @param taskId
     * @return list
     */
    List<ExamAgreementVO> getExamNoticeAndWelcomeWordsList(String taskId);

    /**
     * 上传图片
     * @param file
     * @param taskId
     * @return url
     * @throws IOException
     */
    String uploadAgreementPicture(MultipartFile file, String taskId) throws IOException;

    /**
     * 初始化考生须知-任务
     * @param taskId
     * @param officeId
     */
    void initTaskExamAgreement(String taskId, String officeId);

    void copyTaskExamAgreement(String newTaskId, String oldTaskId, String userName);

    /**
     * 是否存在空的考试协议内容
     * @param taskId
     * @return
     */
    void existNullExamAgreement(String taskId);

    /**
     * 获取考试协议html
     *
     * @param taskId
     * @return
     */
    String getExamAgreement(String taskId);
}
